<template>
  <div>
    <!-- <div class="table"> -->
    <div class="tableHead">
      <div class="tabletitle">列表</div>

    </div>
    <baseTable ref="table" @chaneg-size="changeSizeHandle" @chaneg-page="changePageHandle">
      <el-table-column type="index" label="序号" min-width="50"/>
      <el-table-column :show-overflow-tooltip="true" prop="url_desc" label="页面" min-width="150"/>
      <el-table-column :formatter="dateFormat" prop="browse_start_at" label="浏览开始时间" min-width="150"/>

    </BaseTable>
    <!-- </div> -->

  </div>

</template>

<script>
import BaseTable from '@/components/BaseTable'
import formMixins from '@/mixins/formMixins'
import { mapGetters } from 'vuex'
import filtercode from '@/components/Checkbox/filtercode'
import rSelect from '@/components/Select/Select'
import { queryPageInfos4browse } from '@/api/vehicle/custBiz.js'

export default {
  components: {
    rSelect,
    BaseTable,
    filtercode
  },
  mixins: [formMixins],
  props: {
    user_id: {
      type: String
    }
  },
  data() {
    return {
      search: {
        user_id: this.user_id,
        limit: 10,
        pageNum: 1
      }
    }
  },
  computed: {
    ...mapGetters(['dictMap', 'regionMap'])
  },

  // 初始化
  mounted() {
    this.searchHandle()
  },

  methods: {

    searchHandle() {
      const table = this.$refs['table']
      const args = Object.assign({}, this.search)

      queryPageInfos4browse(args)
        .then(res => {
          table.complete().filData(res)
        })
        .catch(err => {
          table.complete()
        })
    }
  }
}
</script>

<style scoped>
</style>
